﻿using System;
using System.Collections.Generic;
using System.Text;
using QuanLyNhaSach.QuanLyNhaSachDTO;
using System.Data;
using QuanLyNhaSach.QuanLyNhaSachDao;

namespace QuanLyNhaSach.QuanLyNhaSachBus
{
    class HoaDonBus
    {
        public static bool ThemHoaDon(HoaDonDTO tl)
        {

            if (HoaDonDao.Insert(tl))
                return true;

            else
                return false;

        }

        public static DataTable GetHoaDonAll()
        {
            DataTable dt = HoaDonDao.GetHoaDonAll();
            return dt;

        }

        public static DataTable GetHoaDonTheoMaHD(int s)
        {
            DataTable dt = HoaDonDao.GetHoaDonTheoMaHD(s);
            return dt;

        }

        public static void Delete(HoaDonDTO tl)
        {
            HoaDonDao.Delete(tl);


        }
        public static bool Update(HoaDonDTO tl)
        {
            if (HoaDonDao.Update(tl))
                return true;
            return false;

        }
        public static int KTTienNo(HoaDonDTO tl)
        {
            return HoaDonDao.KTTienNo(tl);
        }



    }
}
